import http from './http'
// if (process.env.NODE_ENV === 'production') {
// } else {
// }

const post = (url, data = {}) =>
  http.post(
    url,
    Object.assign({
    
      },
      // {
      //   data: Object.assign({
      //       role_id: role_id //如果需要再包层data就这样写
      //     },
      //     data
      //   )
      // }
      data
    )
  )
const get = (url, params = {}) =>
  http.get(
    url,
    Object.assign({
       
      },
      params
    )
  )

// 接口说明
const idiomgameData = data => post('/proxy/api/v1/dbsrv_ass_idiomgame_data', data)
const wxConfig = data => post('/extra/wx/js-config', data)
const poetryAuthors = data => post('/poetry/authors', data)
const poetryList = data => post('/poetry/list', data)
const poetryQuestion = data => post('/poetry/question', data)
const playAddress = data => post('/course/play/address', data)

const chapter = data => post('/api/v1/dbsrv_rs_download_chapter', data)
const downloadGets = data => post('/api/v1/dbsrv_rs_download_gets', data)
const downloadAddcnt = data => post('/api/v1/dbsrv_rs_download_addcnt', data)


const asa = params => get('getFissionCourseList', params)
//接口导出 
export {
    idiomgameData,
    wxConfig,
    poetryAuthors,
    poetryList,
    poetryQuestion,
    playAddress,
    chapter,
    downloadGets,
    downloadAddcnt,
    asa
}
